import request from '@/utils/request'

// 查询评论列表
export function listPinglun(query) {
  return request({
    url: '/web/pinglun/list',
    method: 'get',
    params: query
  })
}

// 查询评论详细
export function getPinglun(id) {
  return request({
    url: '/web/pinglun/' + id,
    method: 'get'
  })
}

// 新增评论
export function addPinglun(data) {
  return request({
    url: '/web/pinglun',
    method: 'post',
    data: data
  })
}

// 修改评论
export function updatePinglun(data) {
  return request({
    url: '/web/pinglun',
    method: 'put',
    data: data
  })
}

// 删除评论
export function delPinglun(id) {
  return request({
    url: '/web/pinglun/' + id,
    method: 'delete'
  })
}

// 导出评论
export function exportPinglun(query) {
  return request({
    url: '/web/pinglun/export',
    method: 'get',
    params: query
  })
}